//基于聊天封装公共状态处理
var chatComponent = new Proxy({}, {
  get: function (target, key, receiver) {
    console.log(`访问status ${key}`);
    return Reflect.get(target, key, receiver);
  },
  set: function (target, key, value, receiver) {
    console.log(`写入(出)status ${key, value}`);
    this.DataCue(`${key, value}`)
    return Reflect.set(target, key, value, receiver);
  },
  DataCue: function (e) {
    console.log(e, '我是更新后的数据')
    return e
  }
})


export default chatComponent




// export const DataCue = query => {
//   return `写入(出)status ${key, value}`
// }

